package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PickGoods generated by hbm2java
 */
@Entity
@Table(name = "pick_goods", catalog = "good_fresh")
public class PickGoods implements java.io.Serializable {

	private Integer pickGoodsId;
	private GoodsInfo goodsInfo;
	private UserInfo userInfo;
	private String pickGoodsDesc;
	private Date createTime;
	private Date updateTime;
	private String goodsHoldOne;
	private String goodsHoldTwo;
	private Set<Earnings> earningses = new HashSet<Earnings>(0);
	private Set<GoodsImage> goodsImages = new HashSet<GoodsImage>(0);

	public PickGoods() {
	}

	public PickGoods(GoodsInfo goodsInfo, UserInfo userInfo, String pickGoodsDesc, Date createTime, Date updateTime,
			String goodsHoldOne, String goodsHoldTwo, Set<Earnings> earningses, Set<GoodsImage> goodsImages) {
		this.goodsInfo = goodsInfo;
		this.userInfo = userInfo;
		this.pickGoodsDesc = pickGoodsDesc;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
		this.earningses = earningses;
		this.goodsImages = goodsImages;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "PICK_GOODS_ID", unique = true, nullable = false)
	public Integer getPickGoodsId() {
		return this.pickGoodsId;
	}

	public void setPickGoodsId(Integer pickGoodsId) {
		this.pickGoodsId = pickGoodsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_INFO_ID")
	public GoodsInfo getGoodsInfo() {
		return this.goodsInfo;
	}

	public void setGoodsInfo(GoodsInfo goodsInfo) {
		this.goodsInfo = goodsInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_INFO_ID")
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@Column(name = "PICK_GOODS_DESC")
	public String getPickGoodsDesc() {
		return this.pickGoodsDesc;
	}

	public void setPickGoodsDesc(String pickGoodsDesc) {
		this.pickGoodsDesc = pickGoodsDesc;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "GOODS_HOLD_ONE")
	public String getGoodsHoldOne() {
		return this.goodsHoldOne;
	}

	public void setGoodsHoldOne(String goodsHoldOne) {
		this.goodsHoldOne = goodsHoldOne;
	}

	@Column(name = "GOODS_HOLD_TWO")
	public String getGoodsHoldTwo() {
		return this.goodsHoldTwo;
	}

	public void setGoodsHoldTwo(String goodsHoldTwo) {
		this.goodsHoldTwo = goodsHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pickGoods")
	public Set<Earnings> getEarningses() {
		return this.earningses;
	}

	public void setEarningses(Set<Earnings> earningses) {
		this.earningses = earningses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "pickGoods")
	public Set<GoodsImage> getGoodsImages() {
		return this.goodsImages;
	}

	public void setGoodsImages(Set<GoodsImage> goodsImages) {
		this.goodsImages = goodsImages;
	}

}
